package main

import (
	"bytes"
	"encoding/binary"
	"fmt"
)

func main() {

	buf := []byte("hello")

	var str string

	reader := bytes.NewReader(buf)
	err := binary.Read(reader, binary.BigEndian, &str)

	if err != nil {
		panic(err)
	}

	fmt.Printf("%s\n", str)

}
